
params ["_group", "_position","_mode"];

private _leader = leader _group;


{
	private _dir = _leader getDir _x;
	private _dist = _x distance2D _leader;
	
	if (_mode == 0) then {
		//获取队长撤离点给队员
		_EvacuatePoit = _leader getVariable["EvacuatePoit",true]; 
		_x setVariable["EvacuatePoit",_EvacuatePoit,true]; 
		_x setPos (_position getPos [_dist, _dir]);
		//启动定时器
		{0 spawn Destiny_fnc_timerStart} remoteExec ["call", _x];
	}else{
		_pos = _position getPos [0,0];
		_pos set [2,1];
		_x setPosATL _pos;
		//停止定时器
		{0 spawn Destiny_fnc_timerStop} remoteExec ["call", _x];
	};

}forEach units _group - [_leader];

_pos = _position getPos [0,0];
_pos set [2,1];
_leader setPosATL _pos;

0 spawn Destiny_fnc_timerStart;